package com.edie.customview.modular;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.edie.customview.R;

/**
 * edie create on 2018/7/21
 */
public class DataGenerator {
    public static final int []mTabRes = new int[]{R.drawable.tab_home_selector,R.drawable.tab_home_selector,R.drawable.tab_home_selector,R.drawable.tab_home_selector,R.drawable.tab_home_selector};
//    public static final int []mTabResPressed = new int[]{R.drawable.ic_tab_strip_icon_feed_selected,R.drawable.ic_tab_strip_icon_category_selected,R.drawable.ic_tab_strip_icon_pgc_selected,R.drawable.ic_tab_strip_icon_profile_selected};
    public static final String []mTabTitle = new String[]{"首页","发现","关注","关注","我的"};



    /**
     * 获取Tab 显示的内容
     * @param context
     * @param position
     * @return
     */
    public static View getTabView(Context context, int position){
        boolean b = position % 2 == 0;
        View view = LayoutInflater.from(context).inflate(b?R.layout.item_ne:R.layout.item_ne1,null);
        ImageView tabIcon = (ImageView) view.findViewById(R.id.tab_content_image);
        tabIcon.setImageResource(mTabRes[position]);
        TextView tabText = (TextView) view.findViewById(R.id.tab_content_text);
        tabText.setText(mTabTitle[position]);
        return view;
    }

}
